package com.uqbar.asteroids.components;


public class MediumAsteriod extends Asteroid{
	//para instanciacion desde otro asteroide.
	protected MediumAsteriod(double posX, double posY, double width, double height) {		
		
		super(30, 50, width, height);
		this.setX(posX);
		this.setY(posY);
		this.definirAnguloDeSalidaDespuesDeImpacto();
	}
	//para instanciacion directa.
	public MediumAsteriod( double width, double height) {
		super(30, 100, width, height);
		this.definirPosicion(width, height);
	}

	@Override
	protected void hasHit() {
		this.getScene().addComponent(new TinyAsteroid(this.getX(), this.getY(),this.width, this.heigth));
		this.getScene().addComponent(new TinyAsteroid(this.getX(), this.getY(),this.width, this.heigth));
		this.getScene().addMediumAsteriod(this);
		this.toOutScreen();
		
	}


}
